fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

index_of

interval.index_of

(e T)
 => 
option i64
[Redefinition of  Sequence.index_of]
index of `e` in this interval, `nil` if not contained

Inverse of `nth`: for a valid index `i`, `index_of` of the `i`-th
element returns `i`.

Complexity: O(1), unlike the inherited O(n) search. This depends on
`contains` being redefined in this feature to be O(1) as well.
Precondition
Inherited from Sequence.index_of
pre
  T : property.equatable

redefines:

0.099dev (GIT hash a68bce9af280552faedee34cd5433dc10b6454de)
last changed: 2026-10-14